<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>逾期明细 管理</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div id="ligergrid1" class="sq-grid"></div>
</div>

<script type="text/javascript">
    var grid = null, menu = null;
    $(function () {
        var cstId='${cstId}';
        grid = $("#ligergrid1").ligerGrid({
            url: '<%=path%>/capital/capOverdueInfo/searchDtlListByCstId.do?cstId='+cstId,
            method: 'get',
            columns: [
                {display: '支付表', name: 'paySchNo', width: 160, align: 'left'},
                {display: '期次', name: 'payPd', width: 60, align: 'center'},
                {display: '应付日期', name: 'overdueDate', width: 100, align: 'center',render:renderDate},
                {display: '逾期金额', name: 'overdueAmount', minWidth: 100, align: 'right', enabledSort: false,
                    render:function(rowdata,index,value){
                        return '&yen;'+FormatMoney(rowdata.overdueAmount/100);
                    }
                },
                {display: '罚息金额', name: 'penaltyAmount', minWidth: 100, align: 'right', enabledSort: false,
                    render:function(rowdata,index,value){
                        return '&yen;'+FormatMoney(rowdata.penaltyAmount/100);
                    }
                },
                {display: '应收金额', name: 'recAmt', minWidth: 100, align: 'right', enabledSort: false,
                    render:function(rowdata,index,value){
                        return '&yen;'+FormatMoney((rowdata.penaltyAmount+rowdata.overdueAmount)/100);
                    }
                },
            ],
            root: 'rows',
            hideLoadButton : true,
            width: '100%',
            height: '100%',
            rownumbers:true,  //显示序号
            allowUnSelectRow:true,
            alternatingRow: true,
            frozen: false,
            usePager: false
        });

        grid.setHeight(100);

        $("#pageloading").hide();
    });

    //格式化时间
    function renderDate(rowdata, index, value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
        }
        return dateStr;
    }
</script>

</body>
</html>
